<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html;charset=UTF-8" encoding="UTF-8">
	<h:head>

	</h:head>

	<h:body>

		<h:form id="form">
			<p:selectOneRadio id="selectoneradio"
				value="#{selectOneRadio002.value}" unselectable="true">
				<f:selectItems value="#{selectOneRadio002.drivers}" var="driver"
					itemLabel="#{driver.name}" itemValue="#{driver.id}" />
			</p:selectOneRadio>

			<p:commandButton id="submit" update="@form" value="Submit" />
		</h:form>

		<h:form id="formAjax">
			<p:messages id="msgs" showDetail="true">
				<p:autoUpdate />
			</p:messages>

			<p:selectOneRadio id="selectoneradioajax"
				value="#{selectOneRadio002.value}" unselectable="true">
				<f:selectItems value="#{selectOneRadio002.drivers}" var="driver"
					itemLabel="#{driver.name}" itemValue="#{driver.id}" />
				<p:ajax process="@this" update="@this" listener="#{selectOneRadio002.onAjaxChange()}" />
			</p:selectOneRadio>
		</h:form>

	</h:body>
</f:view>

</html>